//super关键字用法


/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author: WJW
 * Date: 2024-08-17
 * Time: 23:17
 */

class Person{
    protected String name;

    public Person(String name){
        this.name = name;
    }
}

class Student extends Person{
    private String name;

    public Student(String name,String name1) {
        super(name);
        this.name = name1;
    }

    public void getInfo(){
        System.out.println(this.name); //child
        System.out.println(super.name); //father
    }
}
public class Test {
    public static void main(String[] args) {
        Student s1 = new Student("Father","Child");
        s1.getInfo();

    }
}
